package com.spzx.product.api;

import com.spzx.common.core.constant.ServiceNameConstants;
import com.spzx.common.core.domain.R;
import com.spzx.product.api.domain.Brand;
import com.spzx.product.api.factory.RemoteBrandServiceFactory;
import com.spzx.product.api.factory.RemoteCategoryServiceFactory;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.List;

@FeignClient(contextId = "remoteBrandService",
        value = ServiceNameConstants.PRODUCT_SERVICE ,//注册中心的服务名
        fallbackFactory = RemoteBrandServiceFactory.class)


public interface RemoteBrandService {


    @Operation(summary = "内部调用接口：查询所有品牌")
    @GetMapping("brand/listAllBrands")
    public R<List<Brand>> listAllBrands();
}
